package yangtuo.io.core.restful;

/**
 * <pre>
 *   http 接口结果状态码枚举
 * </pre>
 * Created by sirius on 2018/9/19.
 *
 * @author sirius
 * @since 1.0
 */
public enum ResultCode {
    CODE_200("200", "success", "success"),
    CODE_401("401", "fail", "your token is wrong"),
    CODE_402("402", "fail", "your token has expired"),
    CODE_403("403", "fail", "you have no authority to access"),
    CODE_405("405", "fail", "data is null"),
    CODE_500("500", "fail", "runtime exception");

    private final String code;
    private final String status;
    private final String describe;

    ResultCode(String code, String status, String describe) {
        this.code = code;
        this.status = status;
        this.describe = describe;
    }

    public String getCode() {
        return code;
    }

    public String getStatus() {
        return status;
    }

    public String getDescribe() {
        return describe;
    }
}
